package com.fast.user.model.admin;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

/**
 * 日志表
 * 
 * @author Administrator
 */
@Entity
@Table(name = "T_dv_SysLog")
@DynamicInsert(true)
@DynamicUpdate(true)
public class SysLog implements java.io.Serializable {

	/**
	 * serialVersionUID:提示:.
	 * 
	 * @since JDK 1.7
	 */
	private static final long serialVersionUID = 4205536389014502899L;
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id", unique = true, nullable = false, length = 10)
	private int id;// 日志编号
	private String operator;// 操作者
	private String url;// 路径
	private String ipAddress;// IP地址
	private String ipArea;// 区域
	private String actionName;// 动作名称
	private String logData;// 日志数据
	private String logType;// 日志类型
	private String logDate;// 日期

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getOperator() {
		return operator;
	}

	public void setOperator(String operator) {
		this.operator = operator;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getIpAddress() {
		return ipAddress;
	}

	public void setIpAddress(String ipAddress) {
		this.ipAddress = ipAddress;
	}

	public String getIpArea() {
		return ipArea;
	}

	public void setIpArea(String ipArea) {
		this.ipArea = ipArea;
	}

	public String getActionName() {
		return actionName;
	}

	public void setActionName(String actionName) {
		this.actionName = actionName;
	}

	public String getLogDate() {
		return logDate;
	}

	public void setLogDate(String logDate) {
		this.logDate = logDate;
	}

	@Override
	public String toString() {
		return "{\"id\":\"" + id + "\", \"operator\":\"" + operator + "\", \"url\":\"" + url + "\", \"ipAddress\":\""
				+ ipAddress + "\", \"ipArea\":\"" + ipArea + "\", \"actionName\":\"" + actionName + "\", \"logData\":\""
				+ logData + "\", \"logType\":\"" + logType + "\", \"logDate\":\"" + logDate + "\"}";
	}

	public String getLogData() {
		return logData;
	}

	public void setLogData(String logData) {
		this.logData = logData;
	}

	public String getLogType() {
		return logType;
	}

	public void setLogType(String logType) {
		this.logType = logType;
	}
}
